class AddressForm {
  constructor() {
    this.pactCode = "";
    this.fromTime = "";
    this.transportMode = 2;
  }
}
class FormData {
  constructor() {
    this.tenantId = 10679;
    this.contractNo = ""; //合同编号
    this.fromTime = ""; //发货时间
    // this.fromTimeFlag = false; // 发货时间时分为23:59时为true, 默认false
    // this.transportMode = 2//运输模式
    this.consigneeId = null; //收货方id
    this.fromAddress = {
      address: "",
      city: "",
      cityCode: "",
      district: "",
      districtCode: "",
      province: "",
      provinceCode: ""
    }; //发货地址
    this.consigneeName = ""; //收货方名称
    this.customerId = null; //客户id
    this.customerName = ""; //客户名称
    this.deviceCode = null; //电子回单号/快递单号
    this.secondDeviceCode = ""; //第二段 车次/航班号/电子回单号
    this.thirdDeviceCode = ""; //第三段电子回单
    this.isThirdShow = true; //第三段显示
    this.deleteFlag = false;
    this.checkValue = null; //多式联运
    this.currentAddress = []; //多式联运路径
    this.flyNo = null;
    this.flyTime = null;
    this.trainNum = null;
    this.trainTime = null;
    this.trainForm = null;
    this.trainTo = null;
    this.receiptAddress = {
      //火车/飞机/电子回单第三段 电子回单途径地区
      wayCity: "",
      wayCityCode: "",
      wayDistrict: "",
      wayDistrictCode: "",
      wayProvince: "",
      wayProvinceCode: "",
      wayAddress: ""
    };
    this.secordReceiptAddress = {
      //电子回单第二段 电子回单途径地区
      wayCity: "",
      wayCityCode: "",
      wayDistrict: "",
      wayDistrictCode: "",
      wayProvince: "",
      wayProvinceCode: "",
      wayAddress: ""
    };
    this.fromContact = { contactName: "", contactMobile: "" }; //发货联系人、电话
    this.goodsList = [
      {
        //物品信息
        batchNo: "",
        value: null,
        remarks: "",
        goodsId: null,
        name: "",
        barcode: "",
        quantity: null,
        spec: "",
        volume: null,
        weight: null,
        singleWeight: 0,
        singleVolume: 0,
        singleValue: 0
      }
    ];
    this.totalWeight = 0;
    this.totalVolume = 0;
    this.totalValue = 0;
    this.totalQuantity = 0;
    this.volumeAddition = 0;
    this.weightAddition = 0;
    this.toAddress = {
      //收货地址
      address: "",
      city: "",
      cityCode: "",
      district: "",
      districtCode: "",
      province: "",
      provinceCode: ""
    };
    this.days = null;
    this.toTime = ""; //收货时间
    this.toContact = { contactName: "", contactMobile: "" }; //收货联系人、电话
    this.attachments = []; //附件
    this.chargeMode = 2;
    this.deliver = false;
    this.insure = false;
    this.offLoad = false; //卸货
    this.onLoad = false; //装货
    this.pick = false;
    this.goodsCategory = null;
    this.packageMode = null;
    this.priceUnit = 3;
    this.shipMode = 0;
    this.transportMode = 1;

    this.vehicleMode = {
      vehicleCount: 1,
      vehicleLength: null,
      vehicleType: null,
      vehicleVolume: null,
      vehicleWeight: null
    };
    this.trackType = 1;
    this.transports = [];

    this.totalList = [
      {
        batchNo: "",
        value: 0,
        remarks: "",
        goodsId: 0,
        name: "",
        barcode: "补差",
        quantity: 0,
        spec: "",
        volume: this.volumeAddition,
        singleWeight: 0,
        singleVolume: 0,
        weight: this.weightAddition
      },
      {
        batchNo: "",
        value: this.totalValue,
        remarks: "",
        goodsId: 0,
        name: "",
        barcode: "合计",
        quantity: this.totalQuantity,
        spec: "",
        volume: this.totalVolume,
        singleWeight: 0,
        singleVolume: 0,
        weight: this.totalWeight
      }
    ];
  }
}
class TransportForm {
  constructor() {
    this.transportMode = 2;
  }
}
class GoodsForm {
  constructor() {
    this.pactCode = "";
    this.fromTime = "";
  }
}

export { FormData, GoodsForm, TransportForm, AddressForm };
